package com.qf.smartdevice.mapper;

import com.qf.smartdevice.dto.UserDto;
import com.qf.smartdevice.pojo.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface UserMapper {
    /*@Select("select * from users")*/
    List<User> findAllUsers(@Param("username") String username,@Param("status") int status);

    @Insert("insert into users(username,password,type,status) value(#{username},#{password},#{type},#{status})")
    void  addUser(UserDto userDto);

    int deleteByIds(@Param("ids") Integer[] id);

    int updateUser(UserDto userDto);
}
